package com.ruoyi.app.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.app.domain.vo.ShopProfessionVo;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MybatisUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.app.mapper.ShopProfessionMapper;
import com.ruoyi.app.domain.ShopProfession;
import com.ruoyi.app.service.IShopProfessionService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-07
 */
@Service
public class ShopProfessionServiceImpl extends ServiceImpl<ShopProfessionMapper, ShopProfession> implements IShopProfessionService
{
    @Autowired
    private ShopProfessionMapper shopProfessionMapper;

    /**
     * 查询用户信息
     * 
     * @param id 用户信息主键
     * @return 用户信息
     */
    @Override
    public ShopProfession selectShopProfessionById(String id)
    {
        return baseMapper.selectById(id);
    }

    /**
     * 查询用户信息列表
     * 
     * @param shopProfession 用户信息
     * @return 用户信息
     */
    @Override
    public List<ShopProfession> selectShopProfessionList(ShopProfession shopProfession)
    {
        return MybatisUtils.list(baseMapper, shopProfession);
    }

    /**
     * 获取分类信息
     * @param shopId
     * @return
     */
    @Override
    public List<ShopProfessionVo> selectShopProfessionByShopId(String shopId) {
        if(StringUtils.isBlank(shopId)){
            return null;
        }
        return baseMapper.selectShopProfessionByShopId(shopId);
    }
}
